package com.lti.appnet.module.event;

import com.lti.appnet.module.domain.Module;
import com.lti.appnet.module.repository.ModuleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by sinceow on 2014/7/30.
 */
@Service
public class ModuleCreateEvent {

    @Autowired
    ModuleRepository moduleRepository;


    public Module saveModule(Module module) {
        return moduleRepository.save(module);
    }

    public List<Module> saveModules(List<Module> modules) {
        return moduleRepository.save(modules);
    }
}
